import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import UserAdd from '@/components/user/user-add'
import UserEdit from '@/components/user/user-edit'
import UserList from '@/components/user/user-list'
import DeptAdd from '@/components/dept/dept-add'
import DeptEdit from '@/components/dept/dept-edit'
import DeptList from '@/components/dept/dept-list'
import Normal from '@/components/normal'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,
      meta: {
        title: '登录'
      }
    },
    {
      path: '/userAdd',
      name: 'UserAdd',
      component: UserAdd,
      meta: {
        title: '添加'
      }
    },
    {
      path: '/userEdit',
      name: 'UserEdit',
      component: UserEdit,
      meta: {
        title: '编辑'
      }
    },
    {
      path: '/userList',
      name: 'UserList',
      component: UserList,
      meta: {
        title: '列表页'
      }
    },
    {
      path: '/deptAdd',
      name: 'DeptAdd',
      component: DeptAdd,
      meta: {
        title: '添加'
      }
    },
    {
      path: '/deptEdit',
      name: 'DeptEdit',
      component: DeptEdit,
      meta: {
        title: '编辑'
      }
    },
    {
      path: '/deptList',
      name: 'DeptList',
      component: DeptList,
      meta: {
        title: '列表页'
      }
    },
    {
      path: '/normal',
      name: 'Normal',
      component: Normal,
      meta: {
        title: '登录'
      }
    }
  ]
})
